﻿using System.Net;
using System.Net.Mail;
using NUnit.Framework;
using Smartkernel.Net;

namespace Smartkernel.NUnitTest.Net
{
    [Category("Net")]
    [TestFixture]
    public class SmartMailTest
    {
        [Test]
        public void Test()
        {
            //【01】发送电子邮件（涉及方法：Send）
            string to = "caoyanbai@gmail.com";
            string subject = "测试邮件" + System.DateTime.Now.Ticks.ToString();
            WebClient webClient = new WebClient();
            webClient.Encoding = System.Text.Encoding.UTF8;
            string html = webClient.DownloadString("http://www.cnblogs.com/smartkernel/archive/2008/08/04/1259601.html");
            SmartMail.Send(to, subject, html);
        }
    }
}
